<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>东家帮-用户登录</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />

<link rel="stylesheet" href="css/common.css" />
<link rel="stylesheet" href="css/index2.css" />

</head>
<body>
<div class="register">
	<img src="images/logo.png" class="logo" />
	<h1 >您好，欢迎你回来</h1>
	<form method="post" name="loginform"  id="loginform" class="am-form" action="index/login">
	<div class="line"><input type="tel" name="phone" id="phone" placeholder="手机号" ></div>
	<div class="line"><input type="password" name="password" id="password" placeholder="6-18位英文或数字" ></div>
	<div class="line" style="margin-top: 36px;border:0px;"><input type="submit" id="submit"  onclick="login()" value="登录" class="btn" /></div>
	<div class="line" style="text-align:center;color:#ccc;width:90%;border:0px;font-size: 16px;"><a href="#" style="margin-right:10%;">忘记密码</a> | <a href="#" style="margin-left:10%;">注册账号</a> </div>
	</form>
</div>
</body>
<script type="text/javascript" src="js/common.js"></script>
<script src="js/jquery1.10.2.min.js"></script>
<script src="js/jquery.form.js"></script>
<script>
	function login() {
		var options = {
			success : showResponse2, //处理完成的回调函数
			resetForm : true
		};
		$("#loginform").ajaxSubmit(options);
	}
	function showResponse2(responseText) {
		alert(responseText);
		if (responseText.indexOf("操作成功") > -1){
			window.location.href = "index/main";	
		}
		
	}
</script>
</html>
